import java.util.Scanner;
public class five {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		while(in.hasNextInt()){
			int a = in.nextInt();
			int c = 0;
			String s = Integer.toBinaryString(a);
			int b = s.length();
			for(int i = 0;b<=32;i++){
				b++;
				c++;
			}
			System.out.println(c-1);
		}
	}

}
